<template>
  <div class="row data-row">
    <div class="label-wrapper">
      <div class="circle"></div>
      <div>{{ label }}</div>
    </div>
    <div class="wrapper">
      <div v-for="(d, i) in totalData" :key="i" class="item">
        <div class="value">{{ d.value }}</div>
        <div v-if="d.label" class="label">{{ d.label }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    totalData: {
      type: Array,
      default: null
    },
    label: {
      type: String,
      default: ""
    }
  }
};
</script>

<style lang="scss" scoped>
* {
  overflow: hidden;
}
.data-row {
  padding: 0;
  .label-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .circle {
    display: inline-block;
    margin-right: 12px;
    background: #ddeaf4;
    width: 10px;
    height: 10px;
    border-radius: 5px;
  }
  .wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .item {
    min-width: 100px;
    margin-left: 20px;
    text-align: center;
    &:first-child {
      margin-left: 0;
    }
  }
  .value {
    font-size: 18px;
  }
  .label {
    font-size: 14px;
    color: #7f8fa4;
  }
}
</style>
